//
//  LHUserView.m
//  Knight_Tour
//
//  Created by Bruce_Lin on 15/5/13.
//  Copyright (c) 2015年 TouchOne. All rights reserved.
//

#import "LHUserView.h"

@implementation LHUserView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (void)dealloc
{
    [_lable1 release];
    [_lable2 release];
    [_image1 release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        
        self.lable1 = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.size.width / 2 - 50, 130, 100, 20)];
//        _lable1.backgroundColor = [UIColor redColor];
        _lable1.text = @"点击登录";
        _lable1.textAlignment = 1;
        [_lable1 setTextColor:[UIColor whiteColor]];
        [self addSubview:_lable1];
        
        self.lable2 = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.size.width / 2 - 125, 155, 250, 20)];
//        _lable2.backgroundColor = [UIColor yellowColor];
        _lable2.text =@"记录旅行的足迹,丰富世界的风景";
        [_lable2 setTextColor:[UIColor grayColor]];
        _lable2.textAlignment = 1;
        [self addSubview:_lable2];
        
        self.image1 = [[UIImageView alloc] initWithFrame:CGRectMake(self.frame.size.width / 2 - 25, 70, 50, 50)];
        _image1.backgroundColor = [UIColor blueColor];
        [_image1.layer setCornerRadius:25];
        [self addSubview:_image1];
        
    }
    return self;
}
//-(void)layoutSubviews
//{
//    [super layoutSubviews];
//    _lable1.frame = CGRectMake(self.frame.size.width / 2 - 50, 130, 100, 20);
//    _lable2.frame = CGRectMake(self.frame.size.width / 2 - 125, 155, 250, 20);
//    _image1.frame = CGRectMake(self.frame.size.width / 2 - 25, 70, 50, 50);
//}
@end
